Learn R Programming

MXM (version 0.9.5)

Correlation based tests with and without permutation p-value: Fisher conditional independence test for continuous class variables with and without permutation based p-value

Description

The main task of this test is to provide a permutation based p-value PVALUE for the null hypothesis: feature 'X' is independent from 'TARGET' given a conditioning set CS.

Usage

condi(ind1, ind2, cs, dat, type = "pearson", rob = FALSE, R = 1)

Arguments

ind1
The index of the one variable to be considered.
ind2
The index of the other variable to be considered.
cs
The index or indices of the conditioning set of variable(s).
dat
A matrix with the data.
type
Do you want the Pearson (type = "pearson") or the Spearman (type = "spearman") correlation to be used.
rob
If you choose type="pearson" then you can sapecify whether you want a robust version of it (TRUE) or not (FALSE).
R
If R = 1 then the asymptotic p-value is calculated. If R > 1 a permutation based p-value is returned.

Value

A vector including the test statistic, it's associated p-value and the relevant degrees of freedom. In the case of a permutation based p-value, the returned test statistic is the observed test statistic divided by the relevant degrees of freedom. This is for the case of ties between many permutation based p-values. The PC algorithm choose a pair of variables based on the p-values. If they are equal it will use the test statistic.

Details

This test is currently designed for usage by the PC algorithm.

References

Hampel F. R., Ronchetti E. M., Rousseeuw P. J., and Stahel W. A. (1986). Robust statistics: the approach based on influence functions. John Wiley & Sons.

Peter Spirtes, Clark Glymour, and Richard Scheines. Causation, Prediction, and Search. The MIT Press, Cambridge, MA, USA, second edition, January 2001.

Lee Rodgers J., and Nicewander W.A. (1988). "Thirteen ways to look at the correlation coefficient." The American Statistician 42(1): 59-66.

Shevlyakov G. and Smirnov P. (2011). Robust Estimation of the Correlation Coefficient: An Attempt of Survey. Austrian Journal of Statistics, 40(1 & 2): 147-156.

See Also

testIndFisher, testIndSpearman, pc.skel, gSquare, CondIndTests

Examples

Run this code
#simulate a dataset with continuous data
dataset <- matrix(runif(1000 * 10, 1, 1000), nrow = 10 )
testIndFisher(dataset[, 1], dataset[, -1], xIndex = 1, csIndex = 2)
condi(ind1 = 1, ind2 = 2, cs = 3, dataset, R = 1)
condi(ind1 = 1, ind2 = 2, cs = 3, dataset, R = 999)

Run the code above in your browser using DataLab